<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{commons :: top_head(~{::title})}">
    <title>搜索结果</title>
</head>
<body>
<!--导航栏-->
<nav th:replace="~{commons :: top_nav_bar(0)}"></nav><!--中间内容-->
<!--中间内容-->
<div class="cus-padding-top-bottom-massive">
    <div class="ui container">
        <!--        分类文章的列表-->
        <!--                标题-->
        <div class="ui top attached segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <div class="ui teal header">相关博客</div>
                </div>
                <div class="right aligned column">
                    共搜索到 <span class="ui header orange">14</span> 篇相关文章
                </div>
            </div>
        </div>
        <!--                列表-->
        <div class="ui attached segment">
            <!--                    单篇文章-->
            <div class="ui padded vertical segment cus-padding-medium cus-mobile-clear-left-right-padded"
                 th:each="blog : ${page.list}">
                <div class="ui middle aligned grid mobile reversed stackable">
                    <div class="ui eleven wide column">
                        <h3 class="header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}"
                                              th:text="${blog.title}">这是一个标题</a>
                        </h3>
                        <p class="cus-text-letter-space1" th:text="|${blog.description}.....|">
                            描述
                        </p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item left middle aligned">
                                        <img th:src="${blog.user.avatar}"
                                             class="ui avatar mini image">
                                        <div class="content">
                                            <a href="#" th:text="${blog.user.nickname}" class="header">用户名</a>
                                        </div>
                                    </div>
                                    <div class="item left middle aligned">
                                        <i class="iconfont icon-B5"></i><span
                                            th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}"></span>
                                    </div>
                                    <div class="item left middle aligned">
                                        <i class="iconfont icon-B5"></i><span
                                            th:text="${blog.views}">1001</span>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column middle right aligned">
                                <a href="#" th:text="${blog.type.name}"
                                   th:href="@{/types/{id}(id=${blog.type.id})}"
                                   class="ui label teal right floated">分类标签</a>
                            </div>
                        </div>
                    </div>

                    <div class="ui five wide column">
                        <a href="#" alt="文章占位图链接" th:href="@{/blog/{id}(id=${blog.id})}">
                            <img th:src="${blog.firstPicture}" alt="文章占位图"
                                 class="ui rounded image fluid">
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="ui bottom attached segment" th:if="${page.pages}>1">
            <div class="ui middle aligned two column grid">
                <a class="column" th:href="@{/{pageNum}(pageNum=${page.prePage})}"
                   th:if="${page.hasPreviousPage}">
                    <div class="ui teal basic button">上一页</div>
                </a>
                <a class="right aligned column" th:href="@{/{pageNum}(pageNum=${page.nextPage})}"
                   th:if="${page.hasNextPage}">
                    <div class="ui teal basic button">下一页</div>
                </a>
            </div>
        </div>
    </div>
</div>
<!--底部内容-->
<footer th:replace="~{commons :: footer_nav_bar}"></footer>
</body>
</html>